-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8.x] [Authz] Fix description generation for Open API spec for an API (#198054) #198814
Merged
kibanamachine
merged 1 commit into
elastic:8.x
from
kibanamachine:backport/8.x/pr-198054
Nov 4, 2024
Merged
[8.x] [Authz] Fix description generation for Open API spec for an API (#198054) #198814
kibanamachine
merged 1 commit into
elastic:8.x
from
kibanamachine:backport/8.x/pr-198054
Nov 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tic#198054) Closes elastic#198058. Adds a fix for elastic#197001 ## Summary There was an error in how descriptions were added to the Open API spec for a given route - for the specific case when both a route description and security authz required privileges were present. The code with the error is: https://github.com/elastic/kibana/pull/197001/files#diff-5942307fac5a7b321e7f317bacd2837a7f766f3e79d5aad285513b1f82951b46R79-R80 This PR fixes that error. Also updated: Description field for required privileges now includes a more intuitive descriptor: `Required authorization` as well as a line break. <img width="838" alt="image" src="https://github.com/user-attachments/assets/e6af0459-28e8-40e5-873d-924d1a49b01b"> --------- Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit b12e7d0)
💚 Build Succeeded
Metrics [docs]
|
SiddharthMantri
added a commit
that referenced
this pull request
Nov 4, 2024
#198054) (#198837) # Backport This will backport the following commits from `main` to `8.16`: - [[Authz] Fix description generation for Open API spec for an API (#198054)](#198054) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sid","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-04T15:57:45Z","message":"[Authz] Fix description generation for Open API spec for an API (#198054)\n\nCloses #198058. \r\n\r\nAdds a fix for https://github.com/elastic/kibana/pull/197001\r\n\r\n## Summary\r\nThere was an error in how descriptions were added to the Open API spec\r\nfor a given route - for the specific case when both a route description\r\nand security authz required privileges were present. The code with the\r\nerror is:\r\nhttps://github.com//pull/197001/files#diff-5942307fac5a7b321e7f317bacd2837a7f766f3e79d5aad285513b1f82951b46R79-R80\r\n\r\nThis PR fixes that error. \r\n\r\n\r\nAlso updated: Description field for required privileges now includes a\r\nmore intuitive descriptor: `Required authorization` as well as a line\r\nbreak.\r\n\r\n<img width=\"838\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/e6af0459-28e8-40e5-873d-924d1a49b01b\">\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"b12e7d0e79af8150ea9f2b5940a6ad1d428cff72","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Security","release_note:skip","Feature:Security/Authorization","v9.0.0","backport:prev-major","v8.16.0","v8.17.0"],"number":198054,"url":"https://github.com/elastic/kibana/pull/198054","mergeCommit":{"message":"[Authz] Fix description generation for Open API spec for an API (#198054)\n\nCloses #198058. \r\n\r\nAdds a fix for https://github.com/elastic/kibana/pull/197001\r\n\r\n## Summary\r\nThere was an error in how descriptions were added to the Open API spec\r\nfor a given route - for the specific case when both a route description\r\nand security authz required privileges were present. The code with the\r\nerror is:\r\nhttps://github.com//pull/197001/files#diff-5942307fac5a7b321e7f317bacd2837a7f766f3e79d5aad285513b1f82951b46R79-R80\r\n\r\nThis PR fixes that error. \r\n\r\n\r\nAlso updated: Description field for required privileges now includes a\r\nmore intuitive descriptor: `Required authorization` as well as a line\r\nbreak.\r\n\r\n<img width=\"838\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/e6af0459-28e8-40e5-873d-924d1a49b01b\">\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"b12e7d0e79af8150ea9f2b5940a6ad1d428cff72"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198054","number":198054,"mergeCommit":{"message":"[Authz] Fix description generation for Open API spec for an API (#198054)\n\nCloses #198058. \r\n\r\nAdds a fix for https://github.com/elastic/kibana/pull/197001\r\n\r\n## Summary\r\nThere was an error in how descriptions were added to the Open API spec\r\nfor a given route - for the specific case when both a route description\r\nand security authz required privileges were present. The code with the\r\nerror is:\r\nhttps://github.com//pull/197001/files#diff-5942307fac5a7b321e7f317bacd2837a7f766f3e79d5aad285513b1f82951b46R79-R80\r\n\r\nThis PR fixes that error. \r\n\r\n\r\nAlso updated: Description field for required privileges now includes a\r\nmore intuitive descriptor: `Required authorization` as well as a line\r\nbreak.\r\n\r\n<img width=\"838\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/e6af0459-28e8-40e5-873d-924d1a49b01b\">\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"b12e7d0e79af8150ea9f2b5940a6ad1d428cff72"}},{"branch":"8.16","label":"v8.16.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","labelRegex":"^v8.17.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/198814","number":198814,"state":"MERGED","mergeCommit":{"sha":"312f642c4a4451ff19dbb3a6dcf799996147c8f7","message":"[8.x] [Authz] Fix description generation for Open API spec for an API (#198054) (#198814)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.x`:\n- [[Authz] Fix description generation for Open API spec for an API\n(#198054)](https://github.com/elastic/kibana/pull/198054)\n\n<!--- Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT\n[{\"author\":{\"name\":\"Sid\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-11-04T15:57:45Z\",\"message\":\"[Authz]\nFix description generation for Open API spec for an API\n(#198054)\\n\\nCloses https://github.com/elastic/kibana/issues/198058.\n\\r\\n\\r\\nAdds a fix for\nhttps://github.com//pull/197001\\r\\n\\r\\n## Summary\\r\\nThere\nwas an error in how descriptions were added to the Open API spec\\r\\nfor\na given route - for the specific case when both a route\ndescription\\r\\nand security authz required privileges were present. The\ncode with the\\r\\nerror\nis:\\r\\nhttps://github.com//pull/197001/files#diff-5942307fac5a7b321e7f317bacd2837a7f766f3e79d5aad285513b1f82951b46R79-R80\\r\\n\\r\\nThis\nPR fixes that error. \\r\\n\\r\\n\\r\\nAlso updated: Description field for\nrequired privileges now includes a\\r\\nmore intuitive descriptor:\n`Required authorization` as well as a line\\r\\nbreak.\\r\\n\\r\\n<img\nwidth=\\\"838\\\"\nalt=\\\"image\\\"\\r\\nsrc=\\\"https://github.com/user-attachments/assets/e6af0459-28e8-40e5-873d-924d1a49b01b\\\">\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nElastic Machine\n<[email protected]>\\r\\nCo-authored-by:\nkibanamachine\n<[email protected]>\",\"sha\":\"b12e7d0e79af8150ea9f2b5940a6ad1d428cff72\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.17.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"bug\",\"Team:Security\",\"release_note:skip\",\"Feature:Security/Authorization\",\"v9.0.0\",\"backport:prev-major\",\"v8.16.0\",\"v8.17.0\"],\"title\":\"[Authz]\nFix description generation for Open API spec for an\nAPI\",\"number\":198054,\"url\":\"https://github.com/elastic/kibana/pull/198054\",\"mergeCommit\":{\"message\":\"[Authz]\nFix description generation for Open API spec for an API\n(#198054)\\n\\nCloses https://github.com/elastic/kibana/issues/198058.\n\\r\\n\\r\\nAdds a fix for\nhttps://github.com//pull/197001\\r\\n\\r\\n## Summary\\r\\nThere\nwas an error in how descriptions were added to the Open API spec\\r\\nfor\na given route - for the specific case when both a route\ndescription\\r\\nand security authz required privileges were present. The\ncode with the\\r\\nerror\nis:\\r\\nhttps://github.com//pull/197001/files#diff-5942307fac5a7b321e7f317bacd2837a7f766f3e79d5aad285513b1f82951b46R79-R80\\r\\n\\r\\nThis\nPR fixes that error. \\r\\n\\r\\n\\r\\nAlso updated: Description field for\nrequired privileges now includes a\\r\\nmore intuitive descriptor:\n`Required authorization` as well as a line\\r\\nbreak.\\r\\n\\r\\n<img\nwidth=\\\"838\\\"\nalt=\\\"image\\\"\\r\\nsrc=\\\"https://github.com/user-attachments/assets/e6af0459-28e8-40e5-873d-924d1a49b01b\\\">\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nElastic Machine\n<[email protected]>\\r\\nCo-authored-by:\nkibanamachine\n<[email protected]>\",\"sha\":\"b12e7d0e79af8150ea9f2b5940a6ad1d428cff72\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.16\",\"8.x\"],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/198054\",\"number\":198054,\"mergeCommit\":{\"message\":\"[Authz]\nFix description generation for Open API spec for an API\n(#198054)\\n\\nCloses https://github.com/elastic/kibana/issues/198058.\n\\r\\n\\r\\nAdds a fix for\nhttps://github.com//pull/197001\\r\\n\\r\\n## Summary\\r\\nThere\nwas an error in how descriptions were added to the Open API spec\\r\\nfor\na given route - for the specific case when both a route\ndescription\\r\\nand security authz required privileges were present. The\ncode with the\\r\\nerror\nis:\\r\\nhttps://github.com//pull/197001/files#diff-5942307fac5a7b321e7f317bacd2837a7f766f3e79d5aad285513b1f82951b46R79-R80\\r\\n\\r\\nThis\nPR fixes that error. \\r\\n\\r\\n\\r\\nAlso updated: Description field for\nrequired privileges now includes a\\r\\nmore intuitive descriptor:\n`Required authorization` as well as a line\\r\\nbreak.\\r\\n\\r\\n<img\nwidth=\\\"838\\\"\nalt=\\\"image\\\"\\r\\nsrc=\\\"https://github.com/user-attachments/assets/e6af0459-28e8-40e5-873d-924d1a49b01b\\\">\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nElastic Machine\n<[email protected]>\\r\\nCo-authored-by:\nkibanamachine\n<[email protected]>\",\"sha\":\"b12e7d0e79af8150ea9f2b5940a6ad1d428cff72\"}},{\"branch\":\"8.16\",\"label\":\"v8.16.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"8.x\",\"label\":\"v8.17.0\",\"branchLabelMappingKey\":\"^v8.17.0$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\nBACKPORT-->\n\nCo-authored-by: Sid <[email protected]>"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
main
to8.x
:Questions ?
Please refer to the Backport tool documentation